<div class="tableform">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridlist">
        <tbody>
            <tr>
                <th>客服介入</th>
                <th>货物状态</th>
                <th>买家是否需要退货</th>
                <th>退货时间</th>
                <th>支付宝交易号</th>
                <th>会员ID</th>
                <th>卖家ID</th>
            </tr>
            <tr>
                <td><{$refundinfo.cs_status|default:'无'}></td>
                <td><{$refundinfo.good_status|default:'-'}></td>
                <td><{if $refundinfo.has_good_return=='false'}>否<{else}>是<{/if}></td>
                <td><{$refundinfo.good_return_time|date_format:'%Y-%m-%d'}></td>
                <td><{$refundinfo.alipay_no}></td>
                <td><{$refundinfo.buyer_nick}></td>
                <td><{$refundinfo.seller_nick}></td>
            </tr>
        </tbody>
    </table>
</div>
<div class="tableform">
    <{if $refundinfo.product_data}>
    <h4>申请商品明细</h4>
        <div class="division">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridlist">
                <tbody>
                    <tr>
                        <th>基础物料编码</th>
                        <th>价格</th>
                        <th>数量</th>
                    </tr>
                    <{foreach from=$refundinfo.product_data item=product_data}>
                    <tr>
                        <td><{$product_data.bn}></td>
                        <td><{$product_data.price}></td>
                        <td><{$product_data.num}></td>
                    </tr>
                    <{/foreach}>
                </tbody>
            </table>
    <{/if}>
</div>
<div class="tableform">
    <h4>淘宝凭证查看
        <input type="button" id='return_message' name='return_message' value='下载淘宝凭证'>
    </h4>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridlist">
        <tbody>
            <tr>
                <td>
                <{foreach from=$refundinfo.online_memo item=memo}>
                    <{$memo.created}> &nbsp;&nbsp;<{$memo.content}><{if $memo.voucher_urls}><br><img src='<{$memo.voucher_urls}>' height='50' onclick="showimage('<{$memo.voucher_urls}>')" alt='点击查看大图' style="cursor:pointer;"><{/if}><br>
                <{/foreach}>
                </td>
            </tr>
        </tbody>
    </table>
</div>


<div class="tableform">
    <h4>
        <input type="button" id='add_memo' name='add_memo' value='备注/上传凭证'>
    </h4>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridlist">
        <tbody>

            <tr>
                <th><{t}>客服备注：<{/t}></th>
                <td>
                    <{foreach from=$refundinfo.message_text item=message_text }>
                    <div id="memo_show">
	                <b><{$message_text.op_content|escape:"HTML"}></b> <{$message_text.op_time}> by <{$message_text.op_name}>
                    <{if $message_text.image}>
                    <img src="<{$message_text.image}>" width="50" height='50' onclick="showimage('<{$message_text.image}>')" alt='点击查看大图' style="cursor:pointer;">
                    <{/if}>
	                </div>
                    <{/foreach}>
                </td>
            </tr>
            <tr>
                <th><{t}>拒绝备注：<{/t}></th>
                <td>
                    <{foreach from=$refundinfo.refuse_memo item=refuse_memo }>
                    <div id="memo_show">
                    <b><{$refuse_memo.op_content|escape:"HTML"}></b> <{$refuse_memo.op_time}> by <{$refuse_memo.op_name}>
                    <{if $refuse_memo.image}>
                    <img src="<{$refuse_memo.image}>" width="50" height='50'>
                    <{/if}>
                    </div>
                    <{/foreach}>
                </td>
            </tr>

    </table>

</div>

</div>
<script>
if ($('return_message'))
{
	$('return_message').addEvent('click',function(e){
		var url = 'index.php?app=ome&ctl=admin_return&act=refund_message&p[0]=<{$refundinfo.apply_id}>&p[1]=refund&shop_type=taobao&finder_id=<{$env.get.finder_id}>';
                	new Dialog(url,{title:'淘宝凭证',width:500,height:300});
	
	});
}

if ($('add_memo'))
{
    $('add_memo').addEvent('click',function(e){
		var url = 'index.php?app=ome&ctl=admin_refund_apply&act=refuse_message&p[0]=<{$refundinfo.apply_id}>&p[1]=taobao&finder_id=<{$env.get.finder_id}>';
                	new Dialog(url,{title:'备注/上传凭证',width:500,height:300});
	
	});
}
function showimage(imgpath){
    var url = 'index.php?app=ome&ctl=admin_return&act=showImage&p[0]='+imgpath;
    new Dialog(url,{title:'查看凭证大图',width:500,height:300});
}
</script>